#include "it_setting.h"
#include "ui_it_setting.h"

IT_Setting::IT_Setting(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::IT_Setting)
{
    ui->setupUi(this);
}

IT_Setting::~IT_Setting()
{
    delete ui;
}

void IT_Setting::on_ITCancel_Button_clicked()
{
    this->close();
}

void IT_Setting::on_ITSure_Button_clicked()
{
    if((ui->InitE_LineEdit->text()==NULL)||(ui->QuietTime_LineEdit->text()==NULL)||\
            (ui->SampleInter_LineEdit->text()==NULL))
        QMessageBox::about(this,tr("提示"),tr("参数有误，请检查"));
    else    {
        //int IT_Init,IT_Sample,IT_RunTime,IT_QuitTime;
        IT_Init = ui->InitE_LineEdit->text().toDouble();
        IT_Sample=ui->SampleInter_LineEdit->text().toDouble();
        IT_RunTime=ui->Runtime_LineEdit->text().toDouble();
        IT_QuitTime=ui->QuietTime_LineEdit->text().toDouble();
        emit IT_Sendsignal();
        this->close();
    }
}
